<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../../Utils/bootstrap-3.4.1-dist/css/bootstrap.min.css" />
    <link rel="stylesheet" href="../../Style/dxm_css/EmployeeDetails.css">
    <script src="../../Utils/jquery-3.6.0.min.js"></script>
    <script src="../../Utils/bootstrap-3.4.1-dist/js/bootstrap.js"></script>
</head>
<body>
<div class="container-fluid">
    <div class="context">
        <nav class="navbar  nav-box" style="display: flex;margin: 0">
            <div class="nav1">员工 > 员工管理 > 花名册 > </div><div> 查看员工详情</div>
        </nav>
        <div class="context-bg-box">

        </div>
    </div>
</div>
<script>

    //var list = JSON.parse(localStorage.getItem('data'));
    var data = JSON.parse(sessionStorage.getItem('lookParams'));
        describeEducation()
        function describeEducation(){
            $('.context-bg-box').html = '';
            var content = `
                <div class="contain-box">
                <div class="contain-top">
                    <div class="contain-top-bd"></div>
                    <div class="contain-top-p">员工详情</div>
                </div>
                <hr>
                <div class="contain-general">
                    <div>
                        <div class="general-btn backBtn">返回</div>
                    </div>
                    <div class="contain-general-center">
                        <div><img src="../../images/u4701.png" alt=""></div>
                        <div class="contain-general-center-name">${data.name}</div>
                        <div class="contain-general-center-p">
                            <span>正式</span>
                            <span>|</span>
                            <span>全职</span>
                            <span>|</span>
                            <span>黛西进出口贸易公司</span>
                            <span>|</span>
                            <span>${data.department}</span>
                            <span>|</span>
                            <span>${data.position}</span>
                        </div>
                        <div class="contain-general-center-p">
                            <span class="glyphicon glyphicon-earphone"></span>
                            <span>15689009090</span>
                            <span></span>
                            <span class="glyphicon glyphicon-envelope"></span>
                            <span>15689009090@163.com</span>
                        </div>
                        <div class="bottom-box">
                            启用
                        </div>
                    </div>
                    <div>
                        <button>人事调动</button>
                        <button>导出</button>
                        <button>更多操作</button>
                    </div>
                </div>
            </div>
            <div class="contain-detail bottom-contain">
                <div class="contain-detail-left">
                    <div class="contain-detail-left-h">
                        <div class="contain-top-bd"></div>
                        <div class="contain-detail-left-h-h4">员工信息</div>
                    </div>
                    <ul class="contain-detail-left-list">
                        <li>工作信息</li>
                        <li>个人信息</li>
                        <li class="contain-detail-left-list-ac">
                            <div>教育经历</div>
                            <span class="glyphicon glyphicon-arrow-right left-ic"></span>
                        </li>
                        <li>工作经历</li>
                        <li>合同信息</li>
                        <li>薪资档案</li>
                        <li>附件存档</li>
                        <li>成长记录</li>
                        <li>操作记录</li>
                    </ul>
                </div>
                <div class="contain-detail-right">
                    <div class="contain-top">
                        <div class="contain-top-bd"></div>
                        <div class="contain-top-p">教育经历</div>
                    </div>
                    <hr>
                    <form class="form-inline common" id="entryForm">
                        <div class="common row">
                            <div class="form-group col-md-5">
                                <label for="name1">员工</label>
                                <input type="text" class="form-control" id="name1" name="name" placeholder="请选择">
                            </div>
                            <div class="form-group col-md-5">
                                <label for="name2">员工编号</label>
                                <input type="text" class="form-control" id="name2"  name="number" placeholder="请选择">
                            </div>
                        </div>
                        <div class="common row">
                            <div class="form-group col-md-5">
                                <label for="name3">部门</label>
                                <input type="text" class="form-control" id="name3"  name="department"  placeholder="请输入">
                            </div>
                            <div class="form-group col-md-5">
                                <label for="name4">职位</label>
                                <input type="text" class="form-control" id="name4"   name="position" placeholder="请输入">
                            </div>
                        </div>
                        <div class="common row">
                            <div class="form-group col-md-5">
                                <label for="name5">学历</label>
                                <input type="text" class="form-control" id="name5"  name="educationBJ"  placeholder="请选择">
                            </div>
                            <div class="form-group col-md-5">
                                <label for="name6">毕业院校</label>
                                <input type="text" class="form-control" id="name6"   name="educationSchool" placeholder="">
                            </div>
                        </div>
                        <div class="common row">
                            <div class="form-group col-md-5">
                                <label for="name7">专业</label>
                                <input type="text" class="form-control" id="name7"  name="major"  placeholder="请选择">
                            </div>
                            <div class="form-group col-md-5">
                                <label for="name10">教育类型</label>
                                <input type="text" class="form-control" id="name10"  name="educationType"  placeholder="请选择">
                            </div>
                        </div>
                        <div class="common row">
                            <div class="form-group col-md-5">
                                <label for="name8">开始时间</label>
                                <input type="text" class="form-control" id="name8"  name="startTime"  placeholder="">
                            </div>
                            <div class="form-group col-md-5">
                                <label for="name9">结束时间</label>
                                <input type="text" class="form-control" id="name9"  name="endTime"  placeholder="">
                            </div>
                        </div>

                        <div class="common row">
                            <div class="form-group col-md-4">
                                是否取得学位
                                <label class="radio-inline">
                                    <input type="radio" checked name="isDegree" id="inlineRadio2" value="yes"> 是
                                </label>
                                <label class="radio-inline">
                                    <input type="radio" name="isDegree" id="inlineRadio3" value="no"> 否
                                </label>
                            </div>
                        </div>
                        <!--<div class="common row">
                            <div class="form-group col-md-5">
                                <label for="name12">备注</label>
                                <input type="text" class="form-control" id="name12" placeholder="请选择">
                            </div>
                        </div>-->
                    </form>
                </div>
            </div>
            `
            $('.context-bg-box').append(content);
        }

   document.getElementById('name1').value = data.name;
   document.getElementById('name2').value = data.number;
   document.getElementById('name3').value = data.department;
   document.getElementById('name4').value = data.position;
   document.getElementById('name5').value = data.educationBJ;
   document.getElementById('name6').value = data.educationSchool;
    document.getElementById('name7').value = data.major;
    document.getElementById('name8').value = data.educationType;
    document.getElementById('name9').value = data.startTime;
    document.getElementById('name10').value = data.endTime;

    // 返回跳转
    var backBtn = document.querySelector('.backBtn')
    backBtn.onclick = function () {
        event.preventDefault();
        sessionStorage.removeItem('lookParams');
        var url = location.href;
        url = url.substring(0,url.lastIndexOf("/"));
        window.location.href = `${url}/Employee-Files-Education_Experience.html`
    }

</script>
</body>
</html>